<{include file="public_html/header.html"}>
<{include file="public_html/left_menu.html"}>
	<!-- content starts -->
	<blockquote class="layui-elem-quote"><{$action}></blockquote>

	<div class="layui-tab layui-tab-card">
		<ul class="layui-tab-title">
			<li <{if isset($type) AND $type == 1}>class="layui-this"<{/if}>><a href="/school/edit/<{$school_info['id']|default:'0'}>/1">网校详情</a></li>
			<li <{if isset($type) AND $type == 2}>class="layui-this"<{/if}>><a href="/school/edit/<{$school_info['id']|default:'0'}>/2">网校老师</a></li>
			<!-- <li <{if isset($type) AND $type == 3}>class="layui-this"<{/if}>><a href="/school/edit/<{$school_info['id']|default:'0'}>/3">网校课程</a></li> -->
			
			<!-- <li <{if $type == 4}>class="layui-this"<{/if}>><a href="/school/edit/<{$school_info['id']|default:'0'}>/4">开通题库分类</a></li>
			<li <{if $type == 5}>class="layui-this"<{/if}>><a href="/school/edit/<{$school_info['id']|default:'0'}>/5">开通录播课</a></li> -->
			<li <{if isset($type) AND $type == 6}>class="layui-this"<{/if}>><a href="/school/edit/<{$school_info['id']|default:'0'}>/6">网校权限管理</a></li>
			<li <{if isset($type) AND $type == 7}>class="layui-this"<{/if}>><a href="/subject/school_tiku/0/<{$school_info['id']}>">网校题库</a></li>
			<li <{if isset($type) AND $type == 8}>class="layui-this"<{/if}>><a href="/question_topic/index/0/<{$school_info['id']}>">网校问答&话题</a></li>
			<li <{if isset($type) AND $type == 9}>class="layui-this"<{/if}>><a href="/news/index/0/<{$school_info['id']}>">网校资讯</a></li>
			<li <{if isset($type) AND $type == 11}>class="layui-this"<{/if}>><a href="/school_course?school_id=<{$school_info['id']}>">网校课程</a></li>
			<li <{if isset($type) AND $type == 12}>class="layui-this"<{/if}>><a href="/school/order_record/<{$school_info['id']}>">网校消费记录</a></li>
			<li <{if isset($type) AND $type == 13}>class="layui-this"<{/if}>><a href="/user/index/0/0/0/1/0/0/<{$school_info['id']}>">学员列表</a></li>
		</ul>
	</div>

	<fieldset class="layui-elem-field">
  		<legend>按条件搜索</legend>
  		<div class="layui-field-box">
			<form class="layui-form layui-form-pane1" method="post" action="<{$current_url}>">
				<div class="layui-form-item">
			    	<div class="layui-inline">
			    		<input type="text" name="name" placeholder="话题名称" value="<{if $name}><{$name}><{/if}>" class="layui-input">
			    	</div>
			    	<div class="layui-inline">
			    		<button type="submit" class="layui-btn">搜索</button>
			    		<a class="layui-btn" href="/question_category/index">话题分类</a>
			    		<a class="layui-btn" href="/question_topic/qlist/0/<{$school_info['id']}>">查看无话题问答</a>
			    	</div>
		    	</div>

				
			</form>
  		</div>
	</fieldset>
	<form class="layui-form layui-form-pane1" method="post" delete_action="/question_topic/delete">
		<table class="layui-table" lay-even lay-skin="row">
		  	<thead>
			  	<tr>
				  	<th>ID</th>
				  	<th>话题名称</th>
				  	<th>创建时间</th>
				  	<th>提问数量</th>
				  	<th>是否启用</th>
				  	<th>操作</th>
			  	</tr>
		  	</thead>   
		  	<tbody>
		  	<{foreach from=$question_topic_list item=item}>
			  	<tr>
			  		<td class="center">
						<input type="checkbox" name="ids[]" value="<{$item['id']}>" title="<{$item['id']}>">
			  		</td>
			  		<td class="center"><{$item['name']}></td>
			  		<td class="center"><{$item['add_time']|date_format:'%Y-%m-%d %H:%M:%S'}></td>
			  		<td class="center"><{$item['question_num']}></td>
			  		<td class="center"><{if $item['status'] == 1}>是<{else}>否<{/if}></td>
			  		<td class="center">
			  			<{if $item['status'] == 1}>
			  			<a class="layui-btn layui-btn-primary layui-btn-small" href="/question_topic/status/<{$item['id']}>/0"><i class="layui-icon"></i>关闭话题</a>
			  			<{else}>
			  			<a class="layui-btn layui-btn-primary layui-btn-small" href="/question_topic/status/<{$item['id']}>/1"><i class="layui-icon"></i>恢复话题</a>
			  			<{/if}>
			  			<a class="layui-btn layui-btn-primary layui-btn-small" href="/question_topic/qlist/<{$item['id']}>/<{$school_info['id']}>"><i class="layui-icon"></i>问答列表</a>
					</td>
			  	</tr>
		  	<{/foreach}>
		  	<{if $question_topic_list|count eq 0}>
		  		<tr>
			  		<td class="center" style=" height:120px; text-align:center;line-height:120px;" colspan="8">
						赞无数据！
					</td>
			  	</tr>
		  	<{/if}>
	  		</tbody>
	  	</table>
  	</form>
  	<div class="layui-box layui-laypage layui-laypage-default">
		<{$pagination}>
	</div>
	
<{include file="public_html/footer.html"}>